<?php foreach ($tournament["Match"] as $key => $match) { ?>
    <div class="accordion-heading">
	      <a class="accordion-toggle" data-toggle="collapse" data-parent="#collapseT<?php echo $tournament['Tournament']['id']; ?>" href="#collapseM<?php echo $match['id']; ?>">
	      	<?php echo $match['localteam'].'   ['.$match['score_localteam'].'-'.$match['score_visitorteam'].']   '.$match['visitorteam']; ?>
      	    <?php echo "(".CakeTime::format($match['date'], "%d/%m/%Y"). ' ' . $match['time'].")"; ?>
	      </a>
    </div>
    <div id="collapseM<?php echo $match['id']; ?>" class="accordion-body collapse">
      <div class="accordion-inner">
			<div class="tabbable"> <!-- Only required for left/right tabs -->
			  <ul class="nav nav-tabs">
			    <li class="active"><a href="#tab_event_<?php echo $match['id']; ?>" data-toggle="tab"><?php echo __("Eventi"); ?></a></li>
			    <li><a href="#tab_localteam_<?php echo $match['id']; ?>" data-toggle="tab"><?php echo __("Formazione %s", $match['localteam']); ?></a></li>
			    <li><a href="#tab_visitorteam_<?php echo $match['id']; ?>" data-toggle="tab"><?php echo __("Formazione %s", $match['visitorteam']); ?></a></li>
			  </ul>
			  <div class="tab-content">
			    <div class="tab-pane active" id="tab_event_<?php echo $match['id']; ?>">
			    	<p><?php echo $this->element('event',array("events"=>$match["Event"])); ?></p>
			    </div>
			    <div class="tab-pane" id="tab_localteam_<?php echo $match['id']; ?>">
			      <p><?php echo $this->element('lineups',array("lineups"=>$match["Localteam"])); ?></p>
			    </div>
			    <div class="tab-pane" id="tab_visitorteam_<?php echo $match['id']; ?>">
			      <p><?php echo $this->element('lineups',array("lineups"=>$match["Visitorteam"])); ?></p>
			    </div>
			  </div>
			</div>
      </div>
    </div>
<?php } ?>